import request from '@/utils/request'

// 采购单列表
export function listPurchaseOrder(query) {
  return request({
    url: '/system/purchase/order/list',
    method: 'get',
    params: query
  })
}

// 获取采购单详情
export function getPurchaseOrder(orderNo) {
  return request({
    url: '/system/purchase/order/' + orderNo,
    method: 'get'
  })
}

// 新增采购单
export function addPurchaseOrder(data) {
  return request({
    url: '/system/purchase/order',
    method: 'post',
    data: data
  })
}

// 修改采购单
export function updatePurchaseOrder(data) {
  return request({
    url: '/system/purchase/order',
    method: 'put',
    data: data
  })
}

// 删除采购单
export function delPurchaseOrder(orderNos) {
  return request({
    url: '/system/purchase/order/' + orderNos,
    method: 'delete'
  })
}

